[NET] back: Add TSO support
authorkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Wed, 28 Jun 2006 11:04:32 +0000 (12:04 +0100)
committerkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Wed, 28 Jun 2006 11:04:32 +0000 (12:04 +0100)
commit421afcd1c5780bfc866f5457170d3d095c3fca64
tree31b551001dccecfb1fadc109942fd9d15559af3e
parent2a3c1a46fdaa9264e5512765ed281e6782cdcba1
[NET] back: Add TSO support

This patch adds TCP Segmentation Offload (TSO) support to the backend.
It also advertises this fact through xenbus so that the frontend can
detect this and send through TSO requests only if it is supported.

This is done using an extra request slot which is indicated by a flag
in the first slot.  In future checksum offload can be done in the same
way.

The extra request slot must not be generated if the backend does not
support the appropriate feature bits.  For now this is simply feature-tso.

If the frontend detects the presence of the appropriate feature bits,
it may generate TX requests which have the appropriate request flags
set that indicates the presence of an extra request slot with the extra
information.

On the backend the extra request slot is read if and only if the request
flags are set in the TX request.

This protocol allows more feature bits to be added in future without
breaking compatibility.  At least the hardware checksum bit is planned.

Even though only TSO is supported for now the code actually supports
GSO so it can be applied to any other protocol.  The only missing bit
is the detection of host support for a specific GSO protocol.  Once that
is added we can advertise all supported protocols to the guest.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Keir Fraser <keir@xensource.com>
linux-2.6-xen-sparse/drivers/xen/netback/interface.c
linux-2.6-xen-sparse/drivers/xen/netback/netback.c
linux-2.6-xen-sparse/drivers/xen/netback/xenbus.c
xen/include/public/io/netif.h